#coding='utf-8'
'''
Created on Dec 4, 2015

@author: DQA wangpeng
'''
import ConfigParser

def Getmachineip():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("machineip", "key")
        return current
    
    
def Get_xiami_guess_you_like():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_guess_you_like")

        return current
    
def Get_xiami_swipe_show():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recoomend_swipe_show")
        return current

def Get_xiami_commend():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_recommend")
        return current

def Xiami_first_song_name():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_list_xiami_1", "first_song")
        return current

def Get_xiami_speicail_xpath_tuijian():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xiami_spec", "tuijian_xpath")
        return current
    
def Get_xiami_orign_xpath():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_orgin")
        return current

def Get_xiami_science():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_science")
        return current
    
def Get_xiami_style():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_style")
        return current

def Get_xiami_feeling():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_feeling")
        return current

def Get_xiami_new_special():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xiami_class_name", "new_special")
        return current
    
def Get_xiami_love_special():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_love_speical")
        return current
    
def Get_xiami_popular_commend():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xpath", "xiami_recommend_pupular_commend")
        return current        
    
def Get_xiami_select_menu():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("xiami_selected", "xpath")
        return current        
    
def back_previous_menu():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("common", "back_previous")
        return current

def playback_button_songname():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_button", "songname")
        return current
    
    
def playback_button_swtich_page():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_button", "switch_to_page")
        return current
    
    
    
    
def playback_button_songname_next_page():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_button_next_page", "songname")
        return current

def playback_page_songname():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_page", "songname")
        return current
    
def playback_page_return():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("playback_page", "return_key")
        return current

def alert_popup():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("alert_popup", "confirm_xpath")
        return current
    
def GetImagePath():
    Configpath = r'/Users/dqatcl/apptest/data/configuration.txt'
    with open(Configpath) as f:
        Conf = ConfigParser.ConfigParser()
        Conf.readfp(f)
        current = Conf.get("ImagePath", "key")
        return current

if __name__ =='__main__':
    Getmachineip()
    Get_xiami_guess_you_like()
    playback_button_songname()
    alert_popup()
    GetImagePath()
    
    Get_xiami_new_special()